package com.jeeplus.common.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 查询基类
 */
@ApiModel("查询基类")
@Data
public class BaseQuery implements Serializable {

    private static final long serialVersionUID = -421527464171909940L;

    @ApiModelProperty("当前页数")
    private Long current;

    @ApiModelProperty("每页条数")
    private Long size;

    public Long getCurrent() {
        if (current == null) {
            return 1L;
        }
        return current;
    }

    public Long getSize() {
        if (size == null) {
            return 10L;
        }
        return size;
    }
}
